<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Kinetis Bootloader: fsl_gpio.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="nxp_logo_small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Kinetis Bootloader
   &#160;<span id="projectnumber">2.0.0</span>
   </div>
   <div id="projectbrief">Common bootloader for Kinetis devices</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Introduction</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('fsl__gpio_8h_source.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">fsl_gpio.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2015, Freescale Semiconductor, Inc.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * All rights reserved.</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without modification,</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * are permitted provided that the following conditions are met:</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * o Redistributions of source code must retain the above copyright notice, this list</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *   of conditions and the following disclaimer.</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> * o Redistributions in binary form must reproduce the above copyright notice, this</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *   list of conditions and the following disclaimer in the documentation and/or</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *   other materials provided with the distribution.</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * o Neither the name of Freescale Semiconductor, Inc. nor the names of its</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *   contributors may be used to endorse or promote products derived from this</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *   software without specific prior written permission.</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * DISCLAIMED. IN NO EVENT SDRVL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="comment"> */</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#ifndef _FSL_GPIO_H_</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#define _FSL_GPIO_H_</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &quot;fsl_common.h&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="comment">/*******************************************************************************</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="comment"> * Definitions</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="comment"> ******************************************************************************/</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#define FSL_GPIO_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) </span></div><div class="line"><a name="l00048"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">   48</a></span>&#160;<span class="preprocessor">typedef enum _gpio_pin_direction</span></div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;{</div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ggada41ca0a2ce239fe125ee96833e715c0abacf19933be1940ab40c83535e6a46d4">   50</a></span>&#160;    <a class="code" href="group__gpio__driver.html#ggada41ca0a2ce239fe125ee96833e715c0abacf19933be1940ab40c83535e6a46d4">kGPIO_DigitalInput</a> = 0U,  </div><div class="line"><a name="l00051"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ggada41ca0a2ce239fe125ee96833e715c0a509ebcd228fc813cf4afcacd258680f9">   51</a></span>&#160;    <a class="code" href="group__gpio__driver.html#ggada41ca0a2ce239fe125ee96833e715c0a509ebcd228fc813cf4afcacd258680f9">kGPIO_DigitalOutput</a> = 1U, </div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;} <a class="code" href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">gpio_pin_direction_t</a>;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="group__gpio__driver.html">   62</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span>_gpio_pin_config</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;{</div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ab0b8ce6b7e068de24659c0c382fa481c">   64</a></span>&#160;    <a class="code" href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">gpio_pin_direction_t</a> <a class="code" href="group__gpio__driver.html#ab0b8ce6b7e068de24659c0c382fa481c">pinDirection</a>; </div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="comment">/* Output configurations, please ignore if configured as a input one */</span></div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ae25321cd13f1ed5254f722b0f3c64242">   66</a></span>&#160;    uint8_t <a class="code" href="group__gpio__driver.html#ae25321cd13f1ed5254f722b0f3c64242">outputLogic</a>; </div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;} <a class="code" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a>;</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="comment">/*******************************************************************************</span></div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="comment"> * API</span></div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="comment"> ******************************************************************************/</span></div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="preprocessor">#if defined(__cplusplus)</span></div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#ga0793a4e8cb6e746485012da3e487db53">GPIO_PinInit</a>(GPIO_Type *base, uint32_t pin, <span class="keyword">const</span> <a class="code" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> *config);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;<span class="comment">/* @} */</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00124"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ga5677a2c3b14f5e9f034edbbd5b429c1d">  124</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#ga5677a2c3b14f5e9f034edbbd5b429c1d">GPIO_WritePinOutput</a>(GPIO_Type *base, uint32_t pin, uint8_t output)</div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;{</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;    <span class="keywordflow">if</span> (output == 0U)</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    {</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;        base-&gt;PCOR = 1 &lt;&lt; pin;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    }</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    {</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;        base-&gt;PSOR = 1 &lt;&lt; pin;</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    }</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;}</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ga2f8a8be69355039abd8b1ddf2a236f4c">  142</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#ga2f8a8be69355039abd8b1ddf2a236f4c">GPIO_SetPinsOutput</a>(GPIO_Type *base, uint32_t mask)</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;{</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    base-&gt;PSOR = mask;</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;}</div><div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ga3ac4a7dccb5285b2926f152c3ff12af9">  152</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#ga3ac4a7dccb5285b2926f152c3ff12af9">GPIO_ClearPinsOutput</a>(GPIO_Type *base, uint32_t mask)</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;{</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    base-&gt;PCOR = mask;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;}</div><div class="line"><a name="l00162"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ga2d7bb4c2c2e1eb3b455451beeb42717e">  162</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#ga2d7bb4c2c2e1eb3b455451beeb42717e">GPIO_TogglePinsOutput</a>(GPIO_Type *base, uint32_t mask)</div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;{</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    base-&gt;PTOR = mask;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;}</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;<span class="comment">/* @} */</span></div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#gaf8d77b6a1daf18087dbc6c0814b2ed97">  182</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> uint32_t <a class="code" href="group__gpio__driver.html#gaf8d77b6a1daf18087dbc6c0814b2ed97">GPIO_ReadPinInput</a>(GPIO_Type *base, uint32_t pin)</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;{</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    <span class="keywordflow">return</span> (((base-&gt;PDIR) &gt;&gt; pin) &amp; 0x01U);</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;}</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;<span class="comment">/* @} */</span></div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;uint32_t <a class="code" href="group__gpio__driver.html#ga911ee36033873e98cb47f19be77c130a">GPIO_GetPinsInterruptFlags</a>(GPIO_Type *base);</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#gaad7f69cb09309c9dcd71acd30563a30d">GPIO_ClearPinsInterruptFlags</a>(GPIO_Type *base, uint32_t mask);</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;<span class="comment">/* @} */</span></div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;<span class="preprocessor">#if defined(FSL_FEATURE_SOC_FGPIO_COUNT) &amp;&amp; FSL_FEATURE_SOC_FGPIO_COUNT</span></div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#ga901f0041b94f3d48cad3f1bde778d1ad">FGPIO_PinInit</a>(FGPIO_Type *base, uint32_t pin, <span class="keyword">const</span> <a class="code" href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a> *config);</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;<span class="comment">/* @} */</span></div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;</div><div class="line"><a name="l00286"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ga9387e234a9bdb827b9e7e6b9bf366ea6">  286</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#ga9387e234a9bdb827b9e7e6b9bf366ea6">FGPIO_WritePinOutput</a>(FGPIO_Type *base, uint32_t pin, uint8_t output)</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;{</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;    <span class="keywordflow">if</span> (output == 0U)</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    {</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;        base-&gt;PCOR = 1 &lt;&lt; pin;</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;    }</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;    {</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;        base-&gt;PSOR = 1 &lt;&lt; pin;</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;    }</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;}</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;</div><div class="line"><a name="l00304"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ga5222663f54c421779ed9db3b03b974f2">  304</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#ga5222663f54c421779ed9db3b03b974f2">FGPIO_SetPinsOutput</a>(FGPIO_Type *base, uint32_t mask)</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;{</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;    base-&gt;PSOR = mask;</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;}</div><div class="line"><a name="l00314"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ga0fa54b2ea5eb56e527dca6b134701efc">  314</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#ga0fa54b2ea5eb56e527dca6b134701efc">FGPIO_ClearPinsOutput</a>(FGPIO_Type *base, uint32_t mask)</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;{</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;    base-&gt;PCOR = mask;</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;}</div><div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#ga76fe687b3a1722c451a27cdeb4740406">  324</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#ga76fe687b3a1722c451a27cdeb4740406">FGPIO_TogglePinsOutput</a>(FGPIO_Type *base, uint32_t mask)</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;{</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;    base-&gt;PTOR = mask;</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;}</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;<span class="comment">/* @} */</span></div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;</div><div class="line"><a name="l00344"></a><span class="lineno"><a class="line" href="group__gpio__driver.html#gac0aa5fa3ec465a2d92e23870f399e978">  344</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> uint32_t <a class="code" href="group__gpio__driver.html#gac0aa5fa3ec465a2d92e23870f399e978">FGPIO_ReadPinInput</a>(FGPIO_Type *base, uint32_t pin)</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;{</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;    <span class="keywordflow">return</span> (((base-&gt;PDIR) &gt;&gt; pin) &amp; 0x01U);</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;}</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;<span class="comment">/* @} */</span></div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;uint32_t <a class="code" href="group__gpio__driver.html#ga9715105f63a1f7cccfcd8972e59ea95a">FGPIO_GetPinsInterruptFlags</a>(FGPIO_Type *base);</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;<span class="keywordtype">void</span> <a class="code" href="group__gpio__driver.html#ga175ca244321b5433456ac5d74ff1a1a9">FGPIO_ClearPinsInterruptFlags</a>(FGPIO_Type *base, uint32_t mask);</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;<span class="comment">/* @} */</span></div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* FSL_FEATURE_SOC_FGPIO_COUNT */</span><span class="preprocessor"></span></div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;<span class="comment">/* @} */</span></div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;<span class="preprocessor">#if defined(__cplusplus)</span></div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;}</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* _FSL_GPIO_H_*/</span><span class="preprocessor"></span></div><div class="ttc" id="group__gpio__driver_html_gaad7f69cb09309c9dcd71acd30563a30d"><div class="ttname"><a href="group__gpio__driver.html#gaad7f69cb09309c9dcd71acd30563a30d">GPIO_ClearPinsInterruptFlags</a></div><div class="ttdeci">void GPIO_ClearPinsInterruptFlags(GPIO_Type *base, uint32_t mask)</div><div class="ttdoc">Clears multiple GPIO pins&amp;#39; interrupt status flag. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.c:97</div></div>
<div class="ttc" id="group__gpio__driver_html_gada41ca0a2ce239fe125ee96833e715c0"><div class="ttname"><a href="group__gpio__driver.html#gada41ca0a2ce239fe125ee96833e715c0">gpio_pin_direction_t</a></div><div class="ttdeci">gpio_pin_direction_t</div><div class="ttdoc">GPIO direction definition. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:48</div></div>
<div class="ttc" id="group__gpio__driver_html_ga76fe687b3a1722c451a27cdeb4740406"><div class="ttname"><a href="group__gpio__driver.html#ga76fe687b3a1722c451a27cdeb4740406">FGPIO_TogglePinsOutput</a></div><div class="ttdeci">static void FGPIO_TogglePinsOutput(FGPIO_Type *base, uint32_t mask)</div><div class="ttdoc">Reverses current output logic of the multiple FGPIO pins. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:324</div></div>
<div class="ttc" id="group__gpio__driver_html_ga0fa54b2ea5eb56e527dca6b134701efc"><div class="ttname"><a href="group__gpio__driver.html#ga0fa54b2ea5eb56e527dca6b134701efc">FGPIO_ClearPinsOutput</a></div><div class="ttdeci">static void FGPIO_ClearPinsOutput(FGPIO_Type *base, uint32_t mask)</div><div class="ttdoc">Sets the output level of the multiple FGPIO pins to the logic 0. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:314</div></div>
<div class="ttc" id="group__gpio__driver_html_gac0aa5fa3ec465a2d92e23870f399e978"><div class="ttname"><a href="group__gpio__driver.html#gac0aa5fa3ec465a2d92e23870f399e978">FGPIO_ReadPinInput</a></div><div class="ttdeci">static uint32_t FGPIO_ReadPinInput(FGPIO_Type *base, uint32_t pin)</div><div class="ttdoc">Reads the current input value of the whole FGPIO port. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:344</div></div>
<div class="ttc" id="group__gpio__driver_html_ga5222663f54c421779ed9db3b03b974f2"><div class="ttname"><a href="group__gpio__driver.html#ga5222663f54c421779ed9db3b03b974f2">FGPIO_SetPinsOutput</a></div><div class="ttdeci">static void FGPIO_SetPinsOutput(FGPIO_Type *base, uint32_t mask)</div><div class="ttdoc">Sets the output level of the multiple FGPIO pins to the logic 1. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:304</div></div>
<div class="ttc" id="group__gpio__driver_html_ga911ee36033873e98cb47f19be77c130a"><div class="ttname"><a href="group__gpio__driver.html#ga911ee36033873e98cb47f19be77c130a">GPIO_GetPinsInterruptFlags</a></div><div class="ttdeci">uint32_t GPIO_GetPinsInterruptFlags(GPIO_Type *base)</div><div class="ttdoc">Reads whole GPIO port interrupt status flag. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.c:88</div></div>
<div class="ttc" id="group__gpio__driver_html_ab0b8ce6b7e068de24659c0c382fa481c"><div class="ttname"><a href="group__gpio__driver.html#ab0b8ce6b7e068de24659c0c382fa481c">gpio_pin_config_t::pinDirection</a></div><div class="ttdeci">gpio_pin_direction_t pinDirection</div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:64</div></div>
<div class="ttc" id="group__gpio__driver_html_ga9387e234a9bdb827b9e7e6b9bf366ea6"><div class="ttname"><a href="group__gpio__driver.html#ga9387e234a9bdb827b9e7e6b9bf366ea6">FGPIO_WritePinOutput</a></div><div class="ttdeci">static void FGPIO_WritePinOutput(FGPIO_Type *base, uint32_t pin, uint8_t output)</div><div class="ttdoc">Sets the output level of the multiple FGPIO pins to the logic 1 or 0. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:286</div></div>
<div class="ttc" id="group__gpio__driver_html_ggada41ca0a2ce239fe125ee96833e715c0abacf19933be1940ab40c83535e6a46d4"><div class="ttname"><a href="group__gpio__driver.html#ggada41ca0a2ce239fe125ee96833e715c0abacf19933be1940ab40c83535e6a46d4">kGPIO_DigitalInput</a></div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:50</div></div>
<div class="ttc" id="group__gpio__driver_html_ga175ca244321b5433456ac5d74ff1a1a9"><div class="ttname"><a href="group__gpio__driver.html#ga175ca244321b5433456ac5d74ff1a1a9">FGPIO_ClearPinsInterruptFlags</a></div><div class="ttdeci">void FGPIO_ClearPinsInterruptFlags(FGPIO_Type *base, uint32_t mask)</div><div class="ttdoc">Clears the multiple FGPIO pins&amp;#39; interrupt status flag. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.c:170</div></div>
<div class="ttc" id="group__gpio__driver_html_ga5677a2c3b14f5e9f034edbbd5b429c1d"><div class="ttname"><a href="group__gpio__driver.html#ga5677a2c3b14f5e9f034edbbd5b429c1d">GPIO_WritePinOutput</a></div><div class="ttdeci">static void GPIO_WritePinOutput(GPIO_Type *base, uint32_t pin, uint8_t output)</div><div class="ttdoc">Sets the output level of the multiple GPIO pins to the logic 1 or 0. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:124</div></div>
<div class="ttc" id="group__gpio__driver_html_ga0793a4e8cb6e746485012da3e487db53"><div class="ttname"><a href="group__gpio__driver.html#ga0793a4e8cb6e746485012da3e487db53">GPIO_PinInit</a></div><div class="ttdeci">void GPIO_PinInit(GPIO_Type *base, uint32_t pin, const gpio_pin_config_t *config)</div><div class="ttdoc">Initializes a GPIO pin used by the board. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.c:73</div></div>
<div class="ttc" id="group__gpio__driver_html_gaf8d77b6a1daf18087dbc6c0814b2ed97"><div class="ttname"><a href="group__gpio__driver.html#gaf8d77b6a1daf18087dbc6c0814b2ed97">GPIO_ReadPinInput</a></div><div class="ttdeci">static uint32_t GPIO_ReadPinInput(GPIO_Type *base, uint32_t pin)</div><div class="ttdoc">Reads the current input value of the whole GPIO port. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:182</div></div>
<div class="ttc" id="group__gpio__driver_html_ggada41ca0a2ce239fe125ee96833e715c0a509ebcd228fc813cf4afcacd258680f9"><div class="ttname"><a href="group__gpio__driver.html#ggada41ca0a2ce239fe125ee96833e715c0a509ebcd228fc813cf4afcacd258680f9">kGPIO_DigitalOutput</a></div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:51</div></div>
<div class="ttc" id="group__gpio__driver_html_ae25321cd13f1ed5254f722b0f3c64242"><div class="ttname"><a href="group__gpio__driver.html#ae25321cd13f1ed5254f722b0f3c64242">gpio_pin_config_t::outputLogic</a></div><div class="ttdeci">uint8_t outputLogic</div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:66</div></div>
<div class="ttc" id="group__gpio__driver_html_ga901f0041b94f3d48cad3f1bde778d1ad"><div class="ttname"><a href="group__gpio__driver.html#ga901f0041b94f3d48cad3f1bde778d1ad">FGPIO_PinInit</a></div><div class="ttdeci">void FGPIO_PinInit(FGPIO_Type *base, uint32_t pin, const gpio_pin_config_t *config)</div><div class="ttdoc">Initializes a FGPIO pin used by the board. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.c:146</div></div>
<div class="ttc" id="group__gpio__driver_html_ga3ac4a7dccb5285b2926f152c3ff12af9"><div class="ttname"><a href="group__gpio__driver.html#ga3ac4a7dccb5285b2926f152c3ff12af9">GPIO_ClearPinsOutput</a></div><div class="ttdeci">static void GPIO_ClearPinsOutput(GPIO_Type *base, uint32_t mask)</div><div class="ttdoc">Sets the output level of the multiple GPIO pins to the logic 0. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:152</div></div>
<div class="ttc" id="group__gpio__driver_html_ga2f8a8be69355039abd8b1ddf2a236f4c"><div class="ttname"><a href="group__gpio__driver.html#ga2f8a8be69355039abd8b1ddf2a236f4c">GPIO_SetPinsOutput</a></div><div class="ttdeci">static void GPIO_SetPinsOutput(GPIO_Type *base, uint32_t mask)</div><div class="ttdoc">Sets the output level of the multiple GPIO pins to the logic 1. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:142</div></div>
<div class="ttc" id="group__gpio__driver_html_ga2d7bb4c2c2e1eb3b455451beeb42717e"><div class="ttname"><a href="group__gpio__driver.html#ga2d7bb4c2c2e1eb3b455451beeb42717e">GPIO_TogglePinsOutput</a></div><div class="ttdeci">static void GPIO_TogglePinsOutput(GPIO_Type *base, uint32_t mask)</div><div class="ttdoc">Reverses current output logic of the multiple GPIO pins. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:162</div></div>
<div class="ttc" id="group__gpio__driver_html_ga9715105f63a1f7cccfcd8972e59ea95a"><div class="ttname"><a href="group__gpio__driver.html#ga9715105f63a1f7cccfcd8972e59ea95a">FGPIO_GetPinsInterruptFlags</a></div><div class="ttdeci">uint32_t FGPIO_GetPinsInterruptFlags(FGPIO_Type *base)</div><div class="ttdoc">Reads the whole FGPIO port interrupt status flag. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.c:161</div></div>
<div class="ttc" id="group__gpio__driver_html_structgpio__pin__config__t"><div class="ttname"><a href="group__gpio__driver.html#structgpio__pin__config__t">gpio_pin_config_t</a></div><div class="ttdoc">The GPIO pin configuration structure. </div><div class="ttdef"><b>Definition:</b> fsl_gpio.h:62</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_c718a368270b13c54d94892d20736f45.html">drivers</a></li><li class="navelem"><a class="el" href="dir_630cf277023a869561501e39bbf7d792.html">gpio</a></li><li class="navelem"><b>fsl_gpio.h</b></li>
    <li class="footer">Generated on Mon Mar 7 2016 16:48:23 for Kinetis Bootloader by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
